package com.hjy.scheduled.solr.SolrRepository;

import com.hjy.scheduled.mysql.entity.quartz;
import org.springframework.data.domain.Pageable;
import org.springframework.data.solr.repository.Query;
import org.springframework.data.solr.repository.SolrCrudRepository;

import java.util.List;

public interface QuartzSolrRepository extends SolrCrudRepository<quartz, Long> {

    /**
     * 通过名字查询
     *
     * @param name
     * @return
     */
    @Query(" name:*?0* ")
    public List<quartz> findByName(String name);

    /**
     * @param key
     * @param pageable
     * @return
     */
    @Query("?0")
    public List<quartz> findAll(String key, Pageable pageable);
}
